package com.menhai.personmanagement.mapper;

import java.util.List;
import java.util.Map;

import com.menhai.personmanagement.entity.vo.FrontPageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.menhai.personmanagement.entity.MbPopulation;
/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author shikun
 * @since 2021-12-02
 */
@Mapper
public interface MbPopulationMapper extends BaseMapper<MbPopulation>{
	
	/**
	 * 慢病新建报卡  查询人口姓名集合
	 * @param patientName
	 * @return
	 */
	public List<Map<String,Object>> selectReportCardName(@Param("patientName")String patientName,@Param("hosnum")String hosnum,@Param("mblx")String mblx);


	List<Map<String,Object>> youfu(@Param("superiorCode") String superiorCode);
	
	/**
	 * 慢病新建报卡  根据id查询人口信息
	 * @param id
	 * @return
	 */
	public Map<String,Object> selectReportCardById(@Param("id")String id);

	/**
	 * @describe 人口年龄分类
	 * @param
	 * @Return java.util.List<com.menhai.personmanagement.entity.vo.FrontPageVo>
	 * @Date 2021/12/20 10:39
	 * @author shikun
	 */
	public List<FrontPageVo> ageclassification(String superiorCode);

	/**
	 * @describe 健康比例
	 * @param superiorCode
	 * @Return java.util.List<com.menhai.personmanagement.entity.vo.FrontPageVo>
	 * @Date 2022/1/21 14:02
	 * @author shikun
	 */
	public List<FrontPageVo> healthyratio(String superiorCode);

	/**
	 * @describe 性别分类
	 * @param
	 * @Return java.util.List<com.menhai.personmanagement.entity.vo.FrontPageVo>
	 * @Date 2021/12/20 11:57
	 * @author shikun
	 */
	public List<FrontPageVo> genderclassification(String superiorCode);

	/**
	 * @describe 来源分类
	 * @param
	 * @Return java.util.List<com.menhai.personmanagement.entity.vo.FrontPageVo>
	 * @Date 2021/12/20 11:57
	 * @author shikun
	 */
	public List<FrontPageVo> sourceclassification(String superiorCode);


	int selectByfamilyNumberOrderCount(@Param("superiorCode") String superiorCode);
	
	/**
	 * 规范管理人员统计表总人口
	 * @return
	 */
	int chronicPatientGroupsStatisticsTotal(@Param("year")String year,@Param("hosnum")String hosnum);
	
	/**
	 * 规范管理人员统计表确诊总人口
	 * @param year
	 * @param hosnum
	 * @return
	 */
	int chronicPatientGroupsStatisticsQZTotal(@Param("year")String year,@Param("hosnum")String hosnum);


	List gecunrenshu(String state,String local);

	List gecunren();


	List usergecunrenshu();

	List codelistallin();

	List codelistBycodelistId(@Param("hosnum")String hosnum);

	List codeListBykindCode();
	
	List healthPlangecunrenshu();

	List usergecunrenshuAndisAvailable();

	List reportcardtree();

	List xianshicun(String hosnum);

	/**
	 * 更新检测时间
	 * @param checkTime
	 * @param id
	 * @param idnumber
	 * @return
	 */
	int updateCheckTime(@Param("checkTime")String checkTime,@Param("id")String id,@Param("idnumber")String idnumber);
}
